import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import maintry from '@/views/maintry'
import addScore from '@/views/addScore'
import deleteScore from '@/views/deleteScore'
import showScore from '@/views/showScore'
import updateScore from '@/views/updateScore'

// 挂载vue-router
// 将组件添加到router
Vue.use(Router)
export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/login',
            name: 'Login',
            component: Login
        },
        {
            path: '/maintry',
            name: 'maintry',
            component: maintry
        },
        {
            path: '/addScore',
            name: 'addScore',
            component: addScore
        },
        {
            path: '/deleteScore',
            name: 'deleteScore',
            component: deleteScore
        },
        {
            path: '/showScore',
            name: 'showScore',
            component: showScore
        },
        {
            path: '/updateScore',
            name: 'updateScore',
            component: updateScore
        }
    ]
})
